<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>OA模拟与实现</title>
    <link rel="stylesheet" th:href="@{/bootstrap/bootstrap-3.3.7-dist/css/bootstrap.min.css}"/>
    <link rel="stylesheet" th:href="@{/css/top.css}"/>
    <link rel="stylesheet" th:href="@{/css/left.css}"/>
    <link rel="stylesheet" th:href="@{/css/main.css}"/>
    <link rel="stylesheet" th:href="@{/css/model.css}"/>
    <script th:src="@{/js/jquery-3.2.1.min.js}"></script>
    <script th:src="@{/js/dragon.js}"></script>
    <script th:src="@{/js/main.js}"></script>

    <!--<style>-->
        <!--#tname{-->
            <!--font-size: 16px;-->
        <!--}-->
        <!--#model{-->
            <!--width: 90%;-->
            <!--margin-top: -800px;-->
            <!--padding-left: 30%;-->
            <!--position:absolute;-->
            <!--z-index:5;-->

        <!--}-->
        <!--.model-content{-->
            <!--margin-top: 20px;-->
            <!--width: 500px;-->
            <!--background: rgb(255,255,255);-->
            <!--border-radius: 5px;-->
            <!--box-shadow:-3px 2px 2px rgba(0,0,0,.5),3px -2px 2px rgba(0,0,0,.5);-->
        <!--}-->
    <!--</style>-->
</head>

<body style="overflow: hidden;background-color: #f1f1f1;">
    <!-- 头部 -->
    <div class="container-fluid">
        <div class="row head">
            <div class="col-md-9 col-sm-6 hidden-xs top">
                <h4><a th:href="@{~/router/index.html}" target="main">OA教务管理系统</a></h4>
            </div>
            <div class="col-md-3 col-sm-6 col-xs-8">
                <ul class="uli">
                    <li class="toggle">
                        <a th:if="${session.student == null}" href="#">
                            <img  class="img" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" th:src="@{/img/{img}(img=${session.people.img})}" alt="">
                        </a>
                        <ul class="dragon">
                            <li><a href="javascript:;" id="myself">我的</a></li>
                            <li><a href="/login/outLogin">注销</a></li>
                        </ul>
                    </li>
                    <li>
                        <span id="tname">欢迎 <span th:text="${session.people.oname}"></span></span>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <!-- ******************************************** -->
    <!-- 左部 -->
    <div class="left">
        <ul class="ul">
            <li id="lit">
                <a class="nav" th:href="@{~/router/index.html}" target="main">首&nbsp;&nbsp;页</a>
            </li>

            <li th:if="${session.people.oposition==1}">
                <a class="nav slide" href="javascript:;">
                    人员管理
                </a>
                <ul class="chul">
                        <li>
                            <a class="chnav" href="/user/teacher.html" target="main" th:if="${session.people.oauth == 1}">讲师管理</a>
                        </li>
                        <!--<li>-->
                            <!--<a class="chnav" href="/student/student.html" target="main" th:if="${session.people.oauth >= 1}">学生管理</a>-->
                        <!--</li>-->
                </ul>
            </li>
            <li th:if="${session.people.oposition==2 || session.people.oposition==3}">
                <a class="nav slide" href="javascript:;">
                    成绩管理
                </a>
                <ul class="chul">
                    <li th:if="${session.people.oposition==2}">
                        <a class="chnav" href="/score/toInScore" target="main">成绩录入</a>
                    </li>
                    <li>
                        <a class="chnav" href="/score/toPlayScore" target="main">成绩分布</a>
                    </li>
                </ul>
            </li>
            <li>
                <a class="nav slide" href="javascript:;">文件管理</a>
                <ul class="chul">
                    <li>
                        <a href="/file/sendfile.html" class="chnav" target="main">发送文件</a>
                    </li>
                    <li>
                        <a href="/file/reciveFile" class="chnav" target="main"><span>接收文件</span> <!--<span class="badge">4</span>--></a>
                    </li>
                </ul>
            </li>
            <li>
                <a class="nav slide" href="javascript:;">消息管理</a>
                <ul class="chul">
                    <li>
                        <a href="/message/sendmessage.html" class="chnav" target="main">发送消息</a>
                    </li>
                    <li id="msgCount">
                        <a href="/message/reciveMessage" class="chnav" target="main"><span>接收消息</span> <!--<span class="badge" id="msg" th:text="${count==0?'':count}">4</span>--></a>
                    </li>
                </ul>
            </li>
            <li th:if="${session.people.oposition == 3}">
                <a class="nav slide" href="javascript:;">请假管理</a>
                <ul class="chul">
                    <!--<li th:if="${session.student != null}">-->
                        <!--<a href="/leave/getAllLeave.html" class="chnav" target="main">请假管理</a>-->
                    <!--</li>-->
                    <li>
                        <a href="/leave/approved" class="chnav" target="main">审批管理</a>
                    </li>
                </ul>
            </li>
        </ul>
    </div>
    <!--模态框-->
    <div class="" id="model">
        <div class="panel-body model-content">
            <button type="button" class="close" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <!--<hr>-->
            <form id="imgfile" action="/user/updateSelf" method="post" enctype="multipart/form-data" class="form-inline align-self-center">
                <input type="hidden" name="oid" th:value="${session.people.oid}"/>
                <div>
                    <label for="dname">姓名：</label>
                    <input th:value="${session.people.oname}" name="oname" id="dname"/>
                </div>
                <div class="">
                    <label for="ident"><span>身份：</span></label>
                    <input th:value="${session.people.pid.positionname}" type="text" id="ident" value="" disabled>
                </div>
                <div>
                    <label for="img">更换头像：</label>
                    <input type="file" name="file" id="img"/>
                    <span id="imgmsg"></span>
                    <div>
                        <img th:src="'/img/'+${session.people.img}" alt="" class="img img-circle">
                    </div>

                </div>
                <div >
                    <label for="oldpwd">旧密码：</label>
                    <input type="password" th:value="${session.people.opassword}" name="oldpwd" id="oldpwd" disabled/>
                </div>
                <input type="hidden" id="op" name="opassword" th:value="${session.people.opassword}"/>
                <div >
                    <label for="newpwd">新密码：</label>
                    <input type="password" name="newpwd" id="newpwd"/>
                    <span id="alert"></span>
                </div>
                <div class="">
                    <div class="">
                        <button type="submit" class="btn btn-info">修改</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    
    <!-- ******************************************** -->
    <div class="index">
        <iframe name="main" class="index" src="/router/index.html"></iframe>
    </div>
</body>
<script>

</script>
</html>
